package com.yanqu.road.entity.activity.apprentice.config;

import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.utils.string.StringUtils;

import java.util.List;

@FieldTypeAnnotation(tableName = "t_s_activity_apprentice_model")
public class ApprenticeModelConfig {

    @FieldTypeAnnotation(desc = "活动ID", select = true)
    private int activityId;

    @FieldTypeAnnotation(desc = "id", update = true)
    private int id;

    @FieldTypeAnnotation(desc = "职业测试参数")
    private String testParam;
    private List<Integer> testParamList;

    @FieldTypeAnnotation(desc = "权重")
    private int weight;

    public int getActivityId() {
        return activityId;
    }

    public void setActivityId(int activityId) {
        this.activityId = activityId;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getTestParam() {
        return testParam;
    }

    public void setTestParam(String testParam) {
        this.testParam = testParam;
        if (!StringUtils.isNullOrEmpty(testParam)) {
            this.testParamList = StringUtils.stringToIntegerList(testParam, "\\|");
        }
    }

    public List<Integer> getTestParamList() {
        return testParamList;
    }

    public int getWeight() {
        return weight;
    }

    public void setWeight(int weight) {
        this.weight = weight;
    }
}
